home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / AIFF.p < prev    next >
Text File  |  1996-05-01  |  5KB  |  226 lines

  1. {
  2.      File:        AIFF.p
  3.  
  4.      Contains:    Definition of AIFF file format components.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT AIFF;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __AIFF__}
  28. {$SETC __AIFF__ := 1}
  29.  
  30. {$I+}
  31. {$SETC AIFFIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37.  
  38. {$PUSH}
  39. {$ALIGN MAC68K}
  40. {$LibExport+}
  41.  
  42.  
  43. CONST
  44.     AIFFID                        = 'AIFF';
  45.     AIFCID                        = 'AIFC';
  46.     FormatVersionID                = 'FVER';
  47.     CommonID                    = 'COMM';
  48.     FORMID                        = 'FORM';
  49.     SoundDataID                    = 'SSND';
  50.     MarkerID                    = 'MARK';
  51.     InstrumentID                = 'INST';
  52.     MIDIDataID                    = 'MIDI';
  53.     AudioRecordingID            = 'AESD';
  54.     ApplicationSpecificID        = 'APPL';
  55.     CommentID                    = 'COMT';
  56.     NameID                        = 'NAME';
  57.     AuthorID                    = 'AUTH';
  58.     CopyrightID                    = '(c) ';
  59.     AnnotationID                = 'ANNO';
  60.  
  61.     NoLooping                    = 0;
  62.     ForwardLooping                = 1;
  63.     ForwardBackwardLooping        = 2;                            {  AIFF-C Versions  }
  64.     AIFCVersion1                = $A2805140;
  65.  
  66. { Compression Names }
  67.     NoneName     = 'not compressed';
  68.     ACE2to1Name  = 'ACE 2-to-1';
  69.     ACE8to3Name  = 'ACE 8-to-3';
  70.     MACE3to1Name = 'MACE 3-to-1';
  71.     MACE6to1Name = 'MACE 6-to-1';
  72.  
  73.                                                                 {  Compression Types  }
  74.     NoneType                    = 'NONE';
  75.     ACE2Type                    = 'ACE2';
  76.     ACE8Type                    = 'ACE8';
  77.     MACE3Type                    = 'MAC3';
  78.     MACE6Type                    = 'MAC6';
  79.  
  80.  
  81. TYPE
  82.     ID                                    = LONGINT;
  83.     MarkerIdType                        = INTEGER;
  84.     ChunkHeaderPtr = ^ChunkHeader;
  85.     ChunkHeader = RECORD
  86.         ckID:                    ID;
  87.         ckSize:                    LONGINT;
  88.     END;
  89.  
  90.     ContainerChunkPtr = ^ContainerChunk;
  91.     ContainerChunk = RECORD
  92.         ckID:                    ID;
  93.         ckSize:                    LONGINT;
  94.         formType:                ID;
  95.     END;
  96.  
  97.     FormatVersionChunkPtr = ^FormatVersionChunk;
  98.     FormatVersionChunk = RECORD
  99.         ckID:                    ID;
  100.         ckSize:                    LONGINT;
  101.         timestamp:                LONGINT;
  102.     END;
  103.  
  104.     CommonChunkPtr = ^CommonChunk;
  105.     CommonChunk = RECORD
  106.         ckID:                    ID;
  107.         ckSize:                    LONGINT;
  108.         numChannels:            INTEGER;
  109.         numSampleFrames:        LONGINT;
  110.         sampleSize:                INTEGER;
  111.         sampleRate:                extended80;
  112.     END;
  113.  
  114.     ExtCommonChunkPtr = ^ExtCommonChunk;
  115.     ExtCommonChunk = RECORD
  116.         ckID:                    ID;
  117.         ckSize:                    LONGINT;
  118.         numChannels:            INTEGER;
  119.         numSampleFrames:        LONGINT;
  120.         sampleSize:                INTEGER;
  121.         sampleRate:                extended80;
  122.         compressionType:        ID;
  123.         compressionName:        SInt8;                                    {  variable length array, Pascal string  }
  124.     END;
  125.  
  126.     SoundDataChunkPtr = ^SoundDataChunk;
  127.     SoundDataChunk = RECORD
  128.         ckID:                    ID;
  129.         ckSize:                    LONGINT;
  130.         offset:                    LONGINT;
  131.         blockSize:                LONGINT;
  132.     END;
  133.  
  134.     MarkerPtr = ^Marker;
  135.     Marker = RECORD
  136.         id:                        MarkerIdType;
  137.         position:                LONGINT;
  138.         markerName:                Str255;
  139.     END;
  140.  
  141.     MarkerChunkPtr = ^MarkerChunk;
  142.     MarkerChunk = RECORD
  143.         ckID:                    ID;
  144.         ckSize:                    LONGINT;
  145.         numMarkers:                INTEGER;
  146.         Markers:                ARRAY [0..0] OF Marker;                    {  variable length array  }
  147.     END;
  148.  
  149.     AIFFLoopPtr = ^AIFFLoop;
  150.     AIFFLoop = RECORD
  151.         playMode:                INTEGER;
  152.         beginLoop:                MarkerIdType;
  153.         endLoop:                MarkerIdType;
  154.     END;
  155.  
  156.     InstrumentChunkPtr = ^InstrumentChunk;
  157.     InstrumentChunk = PACKED RECORD
  158.         ckID:                    ID;
  159.         ckSize:                    LONGINT;
  160.         baseFrequency:            UInt8;
  161.         detune:                    UInt8;
  162.         lowFrequency:            UInt8;
  163.         highFrequency:            UInt8;
  164.         lowVelocity:            UInt8;
  165.         highVelocity:            UInt8;
  166.         gain:                    INTEGER;
  167.         sustainLoop:            AIFFLoop;
  168.         releaseLoop:            AIFFLoop;
  169.     END;
  170.  
  171.     MIDIDataChunkPtr = ^MIDIDataChunk;
  172.     MIDIDataChunk = RECORD
  173.         ckID:                    ID;
  174.         ckSize:                    LONGINT;
  175.         MIDIdata:                SInt8;                                    {  variable length array  }
  176.     END;
  177.  
  178.     AudioRecordingChunkPtr = ^AudioRecordingChunk;
  179.     AudioRecordingChunk = RECORD
  180.         ckID:                    ID;
  181.         ckSize:                    LONGINT;
  182.         AESChannelStatus:        PACKED ARRAY [0..23] OF UInt8;
  183.     END;
  184.  
  185.     ApplicationSpecificChunkPtr = ^ApplicationSpecificChunk;
  186.     ApplicationSpecificChunk = RECORD
  187.         ckID:                    ID;
  188.         ckSize:                    LONGINT;
  189.         applicationSignature:    OSType;
  190.         data:                    SInt8;                                    {  variable length array  }
  191.     END;
  192.  
  193.     CommentPtr = ^Comment;
  194.     Comment = RECORD
  195.         timeStamp:                LONGINT;
  196.         marker:                    MarkerIdType;
  197.         count:                    INTEGER;
  198.         text:                    SInt8;                                    {  variable length array, Pascal string  }
  199.     END;
  200.  
  201.     CommentsChunkPtr = ^CommentsChunk;
  202.     CommentsChunk = RECORD
  203.         ckID:                    ID;
  204.         ckSize:                    LONGINT;
  205.         numComments:            INTEGER;
  206.         comments:                ARRAY [0..0] OF Comment;                {  variable length array  }
  207.     END;
  208.  
  209.     TextChunkPtr = ^TextChunk;
  210.     TextChunk = RECORD
  211.         ckID:                    ID;
  212.         ckSize:                    LONGINT;
  213.         text:                    SInt8;                                    {  variable length array, Pascal string  }
  214.     END;
  215.  
  216. {$ALIGN RESET}
  217. {$POP}
  218.  
  219. {$SETC UsingIncludes := AIFFIncludes}
  220.  
  221. {$ENDC} {__AIFF__}
  222.  
  223. {$IFC NOT UsingIncludes}
  224.  END.
  225. {$ENDC}
  226.